#!/usr/bin/env python

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from runtest_dalton import Filter, TestRun

test = TestRun(__file__, sys.argv)

f = Filter()

f.add(from_string = 'Polarizable embedding energy contributions:',
      num_lines = 19,
      abs_tolerance = 1.0e-5)

f.add(re= '\@ STATE NO\:',
      ignore_sign = True,
      abs_tolerance = 1.0e-4)

test.run(['pehf_1pa.dal'], ['pehf_1pa.mol'], ['pehf_1pa.pot'], f={'out': f})

print('test')

sys.exit(test.return_code)
